using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace MuseumsBC.Activities
{
    [Activity(Label = "Near Me")]
    public class NearMeActivity : TabActivity
    {
        protected override void OnCreate(Bundle bundle)
        {
            //base.OnCreate(bundle);

            //// Create your application here
            //SetContentView(Resource.Layout.NearMe);

            //var label = FindViewById<TextView>(Resource.NearMe.screen2Label);
            //label.Text = Intent.GetStringExtra("FirstData") ?? "Data not available";
            //label.Text = "successfully subbed layout values.";

            base.OnCreate(bundle);
            SetContentView(Resource.Layout.NearMe);

            TabHost.TabSpec spec;     // Resusable TabSpec for each tab
            Intent intent;            // Reusable Intent for each tab

            // Create an Intent to launch an Activity for the tab (to be reused)
            intent = new Intent(this, typeof(NearMeListActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            // Initialize a TabSpec for each tab and add it to the TabHost
            spec = TabHost.NewTabSpec("nearMeList");
            //spec.SetIndicator("Artists", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            spec.SetIndicator("List");
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            // Do the same for the other tabs
            intent = new Intent(this, typeof(NearMeMapActivity));
            intent.AddFlags(ActivityFlags.NewTask);

            spec = TabHost.NewTabSpec("nearMeMap");
            //spec.SetIndicator("Albums", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            spec.SetIndicator("Map");
            spec.SetContent(intent);
            TabHost.AddTab(spec);

            //intent = new Intent(this, typeof(SongsActivity));
            //intent.AddFlags(ActivityFlags.NewTask);

            //spec = TabHost.NewTabSpec("songs");
            //spec.SetIndicator("Songs", Resources.GetDrawable(Resource.Drawable.ic_tab_artists));
            //spec.SetContent(intent);
            //TabHost.AddTab(spec);

            TabHost.CurrentTab = 0;
        }
    }
}